[mirrors]
http://ftp.gnu.org/gnu/screen/screen-4.2.1.tar.gz

[vars]
filesize=1062485
sha512=30826b2a2fc436483276b90cc4c6679470f7ccb7098c9bb8457d0e534998cd12da02882cf80678465f6540cade170c3fdc6bdfa31b07359ff0d3ffe2d6063710
desc='terminal multiplexer'

[deps]

[build]
patch -p1 < "$K"/screen-root.patch
patch -p1 < "$K"/screen-configure.patch
patch -p1 < "$K"/screen-chmod.patch

[ -n "$CROSS_COMPILE" ] && xconfflags="--host=$($CC -dumpmachine)"
CFLAGS="-D_GNU_SOURCE $optcflags" LDFLAGS="$optldflags" \
  ./configure -C --prefix="$butch_prefix" \
  --with-sys-screenrc="$butch_prefix"/etc/screenrc $xconfflags

cat << EOF >> config.h
#undef UTMPOK
#undef LOGINDEFAULT
#define LOGINDEFAULT 0
#undef GETUTENT
#undef UTHOST
#undef BUGGYGETLOGIN
#undef SOCKDIR
EOF

make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install
